package mc

import (
	"gitee.com/dreamwood/ez-go/db/mgo"
)

const (
	NeedTypeEventNew           = "erp.NeedTypeNew"
	NeedTypeEventBeforeCreate  = "erp.NeedTypeBeforeCreate"
	NeedTypeEventBeforeUpdate  = "erp.NeedTypeBeforeUpdate"
	NeedTypeEventBeforeSave    = "erp.NeedTypeBeforeCreate erp.NeedTypeBeforeUpdate"
	NeedTypeEventAfterCreate   = "erp.NeedTypeAfterCreate"
	NeedTypeEventAfterUpdate   = "erp.NeedTypeAfterUpdate"
	NeedTypeEventAfterSave     = "erp.NeedTypeAfterCreate erp.NeedTypeAfterUpdate"
	NeedTypeEventDelete        = "erp.NeedTypeDelete"
	NeedTypeAccessControlEvent = "erp.NeedTypeAccessControl"
)

func GetNeedTypeConfig() *mgo.DocConfig {
	return NeedType_Config
}

var NeedType_Config *mgo.DocConfig

func init() {
	NeedType_Config = NewNeedTypeConfig()
}
func NewNeedTypeConfig() *mgo.DocConfig {
	return &mgo.DocConfig{
		ContainerKey: "erp.NeedType",
		Fields: []string{
			"name", "sort",
		},
		RelationFields:  []string{},
		RelationConfigs: map[string]*mgo.DocRelation{},
		FieldFilter: map[string]*mgo.DocFieldFilter{
			"default": {
				Select: []string{},
				Omit:   []string{},
			},
		},
	}
}
